﻿<%
Dim HU_logintime,KEYid,keyuser,key,keyids,admin_login

if Admin_Ip="" Then Admin_Ip=getIP()
admin_login=webadmin&"/login.asp"
' sid=getFilter("sid","")
sid = Session("login_sid") & ""

if sid = "" Then response.redirect admin_login

set rsqq=server.createobject("adodb.recordset")
Sqlqq="select * from 74hu_admin where sid='"&sid&"'"
rsqq.open Sqlqq,conn,1,3
if NOT rsqq.eof then
	HU_logintime=time_now
	' 离线检测
	' if  DateDiff("n",HU_logintime,time_now)>25 then
		' response.redirect admin_login
	' else
		' rsqq("lastdate")=time_now
		' rsqq.update()
	' end if
else
	response.redirect admin_login
end if

' if rsqq("sid")<>sid then
	' response.redirect admin_login
' end if

'IP异常检测
' if rsqq("lastip")<>Admin_Ip then
	' response.redirect admin_login
' end if


Keyid=rsqq("id")
keyuser=rsqq("username")
key=rsqq("key")
keyids=trim(rsqq("classids"))

rsqq.close
set rsqq=nothing

sid = "null"

%>